﻿using Api.Core.Model;
using Api.Core.Model.Entity;
using Api.Core.Model.Table;
using Api.Core.Model.ViewModel;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Api.Core.IServices.User
{
    public interface IGroupRoleService : IBaseServices<GroupRoleTable>
    {
        /// <summary>
        /// 新增或修改组和组权限
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<BaseResponse<bool>> AddGroupRoles(GroupViewModel entity);

        /// <summary>
        /// 删除组权限
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<bool> DelGroupRole(GroupViewModel entity);

        /// <summary>
        /// 获取组权限
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<BaseResponse<GroupRoleEntity>> GetGroupRoles(GroupViewModel model);

        /// <summary>
        /// 根据条件获取组
        /// </summary>
        /// <returns></returns>
        Task<BaseResponse<List<GroupTable>>> GetAllGroupsByCondition(GroupEntity moeld);
    }
}
